@EnableTransactionManagement
@MapperScan(value = "com.takkyu.system.mapper")
@Configuration
public class MybatisPlusConfig {
    @Bean("masterDataSource")
    @Primary
    @ConfigurationProperties(
        "spring.datasource.druid.master")
    public DataSource masterDataSource() {
        return DruidDataSourceBuilder
            .create().build();
    }

    @Bean("slaveDataSource")
    @ConfigurationProperties(
        "spring.datasource.druid.slave")
    public DataSource slaveDataSource() {
        return DruidDataSourceBuilder
            .create().build();
    }

    @Bean("dynamicDataSource")
    public DynamicDataSource dynamicDataSource() {
        // set the dynamic data source
        return dynamicDataSource;
    }
    // set the transaction manager
    // and session factory
}
